package com.zmn.oms.third.base.constant;


public class OrderReasonConsts {

    /**
     * 选项
     */
    public final static int REASON_ZERO = 0;
    public final static int REASON_ONE = 1;
    public final static int REASON_TWO = 2;
    public final static int REASON_THREE = 3;
    public final static int REASON_FOUR = 4;
    public final static int REASON_FIVE = 5;
    public final static int REASON_SIX = 6;
    public final static int REASON_SEVEN = 7;
    public final static int REASON_EIGHT = 8;
    public final static int REASON_NINE = 9;

    /**
     * 放弃原因名称(派单撤回理由)
     *
     * @param reasonCode
     * @return
     */
    public static String getDistributeBackReasonCodeName(Integer reasonCode) {
        switch (reasonCode) {
            case REASON_ZERO:
                return "距离远";
            case REASON_ONE:
                return "与消费者期望时间冲突";
            case REASON_TWO:
                return "不会安装此类项目";
            case REASON_THREE:
                return "近期有事无法提供服务";
            case REASON_FOUR:
                return "客户找其他人安装";
            case REASON_FIVE:
                return "用户已经退货";
            case REASON_SIX:
                return "顾客未购买(刷单)";
            case REASON_SEVEN:
                return "安装地址有误";
            case REASON_EIGHT:
                return "客户电话有误";
            case REASON_NINE:
                return "其他原因";
            default:
                return "";
        }
    }


    /**
     * 挂起原因名称
     *
     * @param reasonCode
     * @return
     */
    public static String getHangUpReasonCodeName(Integer reasonCode) {
        switch (reasonCode) {
            case REASON_ZERO:
                return "不符合服务条件";
            case REASON_ONE:
                return "商品问题";
            case REASON_TWO:
                return "客户更改时间";
            case REASON_THREE:
                return "工期长未完工";
            case REASON_FOUR:
                return "无法核销";
            case REASON_FIVE:
                return "其他原因";
            case REASON_SIX:
                return "消费者要求取消服务";
            default:
                return "不符合服务条件";
        }
    }

    /**
     * 预约失败原因
     *
     * @param reasonCode
     * @return
     */
    public static String getReserveFailedReasonCodeName(Integer reasonCode) {
        switch (reasonCode) {
            case REASON_ZERO:
                return "客户无法确认服务时间";
            case REASON_ONE:
                return "电话无人接听";
            case REASON_TWO:
                return "未到货";
            case REASON_THREE:
                return "装修周期未到";
            case REASON_FOUR:
                return "电话关机/无法接通";
            case REASON_FIVE:
                return "用户电话有误（提示电话错/空号/停机)";
            case REASON_SIX:
                return "用户电话有误（接通用户表示打错了，没有要服务的产品)";
            default:
                return "";
        }
    }


    /**
     * 根据天猫validateFailCode获取name
     *
     * @author yule
     * @date 2020/9/12 17:05
     */
    public static String getTmallValidateFailReason(String validateFailCode) {
        switch (validateFailCode) {
            case "worker_face_recognition_failed":
                return "不是本人";
            case "worker_signin_over_distance":
                return "未到工单服务所在区域";
            case "reserve_service_date_not_match":
                return "未到签约上门服务日期";
            default:
                return validateFailCode;
        }
    }
}
